﻿using System.ComponentModel;

namespace BasicMvvmWizard
{
    public class BasicMvvmWizardViewModel : INotifyPropertyChanged
    {
        private bool _installA = true;
        private bool _installB;

        public event PropertyChangedEventHandler PropertyChanged;

        public bool InstallComponentA
        {
            get { return _installA; }
            set
            {
                if (_installA != value)
                {
                    _installA = value;
                    RaisePropertyChanged(new PropertyChangedEventArgs("InstallComponentA"));
                }
            }
        }

        public bool InstallComponentB
        {
            get { return _installB; }
            set
            {
                if (_installB != value)
                {
                    _installB = value;
                    RaisePropertyChanged(new PropertyChangedEventArgs("InstallComponentB"));
                }
            }
        }

        protected void RaisePropertyChanged(PropertyChangedEventArgs e)
        {
            var temp = PropertyChanged;
            if (temp != null)
            {
                temp(this, e);
            }
        }
    }
}
